﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using RS.Host;

using RSCore.Host;

namespace RS.UI
{
    // http://www.codeproject.com/KB/miscctrl/ScriptEditorCtrl.aspx
    // http://www.codeguru.com/tools/standalonetools/article.php/c1409
    // http://www.mdxinfo.com/resources/scripting.php
    // http://www.codeproject.com/KB/edit/SyntaxRichTextBox.aspx

    /// <summary>
    /// Interaction logic for UCScripting.xaml
    /// </summary>
    public partial class UCScripting : UserControl
    {
        public UCScripting()
        {
            InitializeComponent();
            btnExecute.Click += new RoutedEventHandler(btnExecute_Click);
        }

        void btnExecute_Click(object sender, RoutedEventArgs e)
        {
            RSHost.ScriptingService.ExecuteScript(ScriptingLanguage.CSharp, txtScript.Text);
        }
    }
}
